import logging


def assert_is_equals_and_print_diff(expected_dict: dict, actual_dict: dict) -> bool:
    common_items_set = actual_dict.items() & expected_dict.items()
    expected_left_items_set = expected_dict.items() - common_items_set
    actual_left_items_set = actual_dict.items() - common_items_set
    if len(expected_left_items_set) == 0 and len(actual_left_items_set) == 0:
        return True
    else:
        actual_left_items_dict = {k: v for k, v in actual_left_items_set}
        for k, v in expected_left_items_set:
            logging.info(f"{k}: expect: {v}, actual: {actual_left_items_dict.get(k, None)}")
        return False


def get_dict_value_by_key(key, item: dict):
    keys = item.keys()
    if key in keys:
        return item[key]
